package com.uin.saas.controller;


import com.uin.saas.entity.User;
import com.uin.saas.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author WYY-SSS
 * @since 2019-09-06
 */
@RestController
@RequestMapping("/user")
public class UserController {
        @Autowired
        private UserService userService;

        @GetMapping("/saas/test")
        public Object getUsers(){
            HashMap<Object, Object> map = new HashMap<>();
            List<User> users = userService.selectList(null);
            map.put("user",users);
            return map;
        }

}

